function debug_output(n, old_coef, new_coef, k, msg, deg, error)
    for j = 1:n
        fprintf(1,'%d ',mod(old_coef(j),2));
    end
    fprintf(1,'-> ');
    for j = 1:n
       fprintf(1,'%d ',mod(new_coef(j),2));
    end
    fprintf(1,' ( ');
    for j = 1:k
        fprintf(1,'%d ',mod(msg(j), 2));
    end
    fprintf(1, ') ');
    if deg
       fprintf(1,'[DEGENERATE] ');
    end
    fprintf(1, ': Error = %0.3f\n',error);
end
